package com.zdpx.pxframework.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zdpx.pxframework.system.entity.UserPost;
import com.zdpx.pxframework.system.mapper.UserPostMapper;
import com.zdpx.pxframework.system.service.UserPostService;
import org.springframework.stereotype.Service;


/**
 * 用户岗位关联信息 服务实现类
 *
 * @Description:
 * @Author: Cheng XiaoXiao
 * @Date: 2022-02-27 15:20:14
 */
@Service
public class UserPostServiceImpl extends ServiceImpl<UserPostMapper, UserPost> implements UserPostService {
    /**
     * 获取用户岗位关联详情
     *
     * @param id ID
     * @return 单个用户岗位关联详情
     */
    @Override
    public UserPost detailById(String id) {
        return this.getById(id);
    }

    /**
     * 增加用户岗位关联信息
     *
     * @param userPost 用户岗位关联对象
     */
    @Override
    public void saveUserPost(UserPost userPost) {
        this.baseMapper.insert(userPost);
    }

    /**
     * 修改用户岗位关联信息
     *
     * @param userPost 用户岗位关联对象
     */
    @Override
    public void updateUserPostById(UserPost userPost) {
        this.baseMapper.updateById(userPost);
    }

    /**
     * 根据ID删除
     *
     * @param id ID
     */
    @Override
    public void deleteById(String id) {
        this.removeById(id);
    }
}
